package com.acquisition.param.domain;

/**
 * 单独的串口参数
 *
 * @author wuqiwei
 * @date 2020/10/15
 */
public class SingleSerialPortParam {

	/**
	 * 串口号
	 */
	private String portCode;

	/**
	 * 用于存储服务器的串口名：例如串口1
	 */
	private String portNames;

	/**
	 * 波特率
	 */
	private Integer baudRate;

	/**
	 * 数据位
	 */
	private Integer dataBits;

	/**
	 * 校验位NONE(0),ODD(1),EVEN(2),MARK(3),SPACE(4);
	 */
	private Integer parity;

	/**
	 * 停止位
	 */
	private Integer stopBits;

	public SingleSerialPortParam() {
		super();
	}

	public SingleSerialPortParam(String portCode, String portNames, Integer baudRate, Integer dataBits, Integer parity,
								 Integer stopBits) {
		super();
		this.portCode = portCode;
		this.portNames = portNames;
		this.baudRate = baudRate;
		this.dataBits = dataBits;
		this.parity = parity;
		this.stopBits = stopBits;
	}

	public String getPortCode() {
		return portCode;
	}

	public void setPortCode(String portCode) {
		this.portCode = portCode;
	}

	public String getPortNames() {
		return portNames;
	}

	public void setPortNames(String portNames) {
		this.portNames = portNames;
	}

	public Integer getBaudRate() {
		return baudRate;
	}

	public void setBaudRate(Integer baudRate) {
		this.baudRate = baudRate;
	}

	public Integer getDataBits() {
		return dataBits;
	}

	public void setDataBits(Integer dataBits) {
		this.dataBits = dataBits;
	}

	public Integer getParity() {
		return parity;
	}

	public void setParity(Integer parity) {
		this.parity = parity;
	}

	public Integer getStopBits() {
		return stopBits;
	}

	public void setStopBits(Integer stopBits) {
		this.stopBits = stopBits;
	}

	@Override
	public String toString() {
		return "SingleSerialPortParam [portCode=" + portCode + ", portNames=" + portNames + ", baudRate=" + baudRate
				+ ", dataBits=" + dataBits + ", parity=" + parity + ", stopBits=" + stopBits + "]";
	}

}
